package co.sunnyapp.flutter_contact_example

import androidx.annotation.Keep
import androidx.annotation.NonNull
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry
import io.flutter.plugin.common.PluginRegistry
import co.sunnyapp.flutter_contact.FlutterAggregateContactPlugin
import co.sunnyapp.flutter_contact.FlutterRawContactPlugin
import co.sunnyapp.flutter_contact.flutter_contact.FlutterContactPlugin

@Keep
object GeneratedPluginRegistrant {
  fun registerWith(@NonNull flutterEngine: FlutterEngine) {
    val shimPluginRegistry = ShimPluginRegistry(flutterEngine)
    
    // Register the main contact plugin
    FlutterContactPlugin().apply {
      flutterEngine.plugins.add(this)
    }
    
    // Register the unified contact plugin (for github.com/sunnyapp/flutter_unified_contact channel)
    FlutterAggregateContactPlugin.registerWith(shimPluginRegistry.registrarFor("co.sunnyapp.flutter_contact.FlutterAggregateContactPlugin"))
    
    // Register the single contact plugin (for github.com/sunnyapp/flutter_single_contact channel)
    FlutterRawContactPlugin.registerWith(shimPluginRegistry.registrarFor("co.sunnyapp.flutter_contact.FlutterRawContactPlugin"))
  }
}